#ifndef MESH_H
#define MESH_H
#include <QVector>
#include "element.h"
#include "node.h"
#include <armadillo>


class mesh
{
    int nElementsX;
    int nElementsY;
    int nElements;
    int nNodes;
    int numEq;
    float initialX;
    float finalX;
    float initialY;
    float finalY;
    float dx;
    float dy;

    QVector <element> elementos;
    node *nos;

    mat globalMatrix;
    mat globalForce;




public:
    mesh(int , int , float , float , float  , float );

    element getElement(int);
    int     elementIndex(int,int);

    node getNode(int)const;
    node& getNode(int);

    int  nodeIndex(int,int);

    void setGlobalMatrixNumerationXY();

    int getNElementsX();
    int getNElementsY();

    void setGlobalMatrix();
    arma::mat getGlobalMatrix();

    void setGlobalForce();
    arma::mat getGlobalForce();

    void setNodeDeslocation(arma::vec);

    void setNodeDeformation();
    void setNodeDeformationAnal();





private:

protected:
};

#endif // MESH_H
